package cn.caishen.report.domain.report;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 动态报表配置
 *
 * @author Administrator
 */
@TableName(value = "tb_report_config")
@Data
@ApiModel(value = "动态报表配置")
public class ReportConfig implements Serializable {

    /**
     * 动态报表配置编号
     */
    @TableId(value = "report_config_id", type = IdType.AUTO)
    @ApiModelProperty("动态报表配置编号")
    private Integer reportConfigId;

    /**
     * 报表英文名称
     */
    @TableField(value = "report_name")
    @ApiModelProperty("报表英文名称")
    private String reportName;

    /**
     * 模块编号
     */
    @TableField(value = "module_id")
    @ApiModelProperty("模块编号")
    private Integer moduleId;

    /**
     * 模块名称
     */
    @TableField(value = "module_name")
    @ApiModelProperty("模块名称")
    private String moduleName;

    /**
     * select语句
     */
    @TableField(value = "select_sql")
    @ApiModelProperty("select语句")
    private String selectSql;

    /**
     * from语句
     */
    @TableField(value = "from_sql")
    @ApiModelProperty("from语句")
    private String fromSql;

    /**
     * where语句
     */
    @TableField(value = "where_sql")
    @ApiModelProperty("where语句")
    private String whereSql;

    /**
     * group语句
     */
    @TableField(value = "group_by_sql")
    @ApiModelProperty("group语句")
    private String groupBySql;

    /**
     * order语句
     */
    @TableField(value = "order_by_sql")
    @ApiModelProperty("order语句")
    private String orderBySql;

    /**
     * 是否需要图形
     */
    @TableField(value = "need_chart")
    @ApiModelProperty("是否需要图形")
    private Integer needChart;

    /**
     * 数据权限
     */
    @TableField(value = "user_confine")
    @ApiModelProperty("数据权限")
    private String userConfine;

    /**
     * 报表标题列表
     */
    @TableField(exist = false)
    @ApiModelProperty("报表标题列表")
    private List<ReportField> reportFieldList;

    /**
     * 报表条件列表
     */
    @TableField(exist = false)
    @ApiModelProperty("报表条件列表")
    private List<ReportWhere> reportWhereList;

    /**
     * 报表用户自定义标题列
     */
    @TableField(exist = false)
    @ApiModelProperty("报表用户自定义标题列表")
    private List<ReportUserField> reportUserFieldList;
}
